<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<html lang="en" style="font-size: 53.3333px;">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover">
    <script src="${pageContext.request.contextPath}/script/easygo/jweixin-1.6.0.js"  ></script>
    <script src="${pageContext.request.contextPath}/script/easygo/commonH5.js"   ></script>
    <script src="${pageContext.request.contextPath}/script/jquery.js" ></script>
    <link href="${pageContext.request.contextPath}/style/css/easygo/index.105f42f0.css" rel="preload" as="style">
    <link href="${pageContext.request.contextPath}/style/css/easygo/chunk-vendors.347f43e9.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/style/css/easygo/index.105f42f0.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/style/css/easygo/main.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/style/css/easygo/bundleV1_1.css">

</head>
<body>


<div id="app">
    <div data-v-7941d185="" class="home">
        <div data-v-7941d185="" class="home-content">
            <section data-v-7941d185="" class="cl-city home-city" event-id="getCityInfo_85UKSZBQ" style="display: none">
                <div class="cl-city-con"><span class="city-icon"></span><span class="city-name">北京</span></div>
            </section>
            <div data-v-7941d185="">
                <div class="cl-tab-bar" style="display: none">
                    <div class="cl-tab-bar__section-title">商品</div>
                    <div class="cl-tab-bar__section-title">评价</div>
                    <div class="cl-tab-bar__section-title">详情</div>
                    <div class="cl-tab-bar__section-title">推荐</div>
                    <span class="cl-tab-bar__slider" style="left: 43px;"></span></div>
                <div data-v-4334d299="" class=".cl-tab-section">

                    <div data-v-4334d299="" class="dj-goods-swiper" style="height: 6.22rem;">
                        <div class="dj-swiper-group"
                             style="width: 2250px; transition-duration: 0ms; transform: translate(0px, 0px) scale(1) translateZ(0px); transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);">

                            <div class="slider | js-slider">
                                <div class="slider__slides | js-slides">

                                    <div class="slide | js-slide" style="--m: 1.25;">
                                        <div class="dj-swiper-item swiper-item  slide__inner"
                                             style="width: 375px; pointer-events: auto;">
                                            <div class="dj-swiper-imgbox slide__img | js-slide-img"><img
                                                    src="https://www.easygoshanghai.com//easygoshPath/2021/10/26/11757/44b1c516-f863-4132-9f68-7211bb73f79a.jpg"
                                            >
                                            </div>
                                        </div>
                                    </div>


                                </div>

                            </div>
                        </div>


                        <div class="btns-content hidden">
                            <div class="btns video-btn active-btn"><i class="video-icon-caret"></i><span>视频</span></div>

                            <div class="btns img-btn">图片</div>
                        </div>
                        <div class="fullscreen-box" style="display: none;"><i class="dj-icon-close"></i>
                            <div class="img-count">1/6</div>
                        </div>
                        <div class="img-count" style="display: none;">1/6</div>
                    </div>
                    <div data-v-3d9449aa="" data-v-4334d299="" class="orderlabel"
                         event-id="getBestCouponToUpdate_Y54DH5GR">
                        <div data-v-3d9449aa="" class="orderlabel__price">
                            <div data-v-3d9449aa="" class="orderlabel__price--integer"><span data-v-3d9449aa=""
                                                                                             class="icon">¥</span>50
                            </div>
                            <div data-v-3d9449aa="" class="orderlabel__price--after">
                                <div data-v-3d9449aa="" class="orderlabel__price--unit">元/小时</div>
                            </div>
                        </div>
                        <div data-v-3d9449aa="" class="orderlabel__title">日常保洁</div>
                        <div data-v-3d9449aa="" class="orderlabel__description">提前锁定好阿姨，家务包年超划算</div>
                        <div data-v-3d9449aa="" class="orderlabel__tags" style="">
                            <div data-v-3d9449aa="" class="orderlabel__tags--tag">锁定好阿姨</div>
                            <div data-v-3d9449aa="" class="orderlabel__tags--tag">套餐可约周期</div>
                            <div data-v-3d9449aa="" class="orderlabel__tags--tag">省心又省钱</div>
                        </div>
                        <div data-v-58fac8cc="" data-v-3d9449aa="" class="wrapper-box">
                            <div data-v-58fac8cc="" class="wrapper">
                                <div data-v-58fac8cc="" class="desc">您有优惠券可用，下单最高立减5元</div>
                            </div>
                        </div>
                    </div>
                    <div data-v-4334d299="" class="maigin20"></div>
                    <section data-v-0593d9eb="" data-v-4334d299="" event-id="updateBestCoupon_PPFVNQHU"
                             class="maigin20">
                        <div data-v-0593d9eb="" event-id="showCouponList_9NDWYBP2" class="coupon-wrap">
                            <div data-v-0593d9eb="" class="icon">
                                优惠
                            </div>
                            <div data-v-0593d9eb="" class="text">
                                新客首单立减25元
                            </div>
                            <button data-v-0593d9eb="" class="btn dj-button dj-button-primary plain dj-button-normal">
                                  <span class="button-text">
      立即领取
    </span></button>
                        </div>
                        <div data-v-0593d9eb="" class="coupon-modal" event-id="couponListShow_WS0EBA0N"
                             style="display: none;">
                            <div class="coupon-bg" style="display: none;"></div>
                            <div class="coupon-body" style="display: none;">
                                <div class="coupon-header"><span>领取优惠券</span><img
                                        src=""
                                        class="header-close"></div>
                                <div class="couponlist">
                                    <div class="coupon-item">
                                        <div class="coupon-info coupon-noRemark">
                                            <div class="desction-title"><span class="title-strong">25</span><span
                                                    class="title-little">元日常保洁新客券</span></div>
                                            <div class="effectDate"><span>领取后14天内可用</span></div>
                                        </div>
                                        <div class="button-panel">
                                            <div class="btn">立即领取</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                    <div data-v-4334d299="" class="maigin20"></div>
                </div>


                <div data-v-7941d185="" class=".cl-tab-section">
                    <div data-v-7941d185="" class="detail">
                        <div class="detail-title"><span>详情</span></div>
                        <div class="detail-list">
                            <div class="detail-list_item"><img
                                    src="${pageContext.request.contextPath}/style/images/easygo/b334d698f82482dfbea9ce971ec35725.png?x-oss-process=image/auto-orient,0/format,webp""
                                lazy="loaded">
                            </div>
                            <div class="detail-list_item"><img
                                    src="${pageContext.request.contextPath}/style/images/easygo/19ba4c375bdcdaec108628d8ed78977a.png"
                                    lazy="loaded"></div>

                        </div>
                    </div>
                </div>
                <div data-v-7941d185="" class=".cl-tab-section"></div>


            </div>
        </div>
        <div data-v-561ebea1="" data-v-7941d185="" event-id="confirm_4KXCECKP">
            <div data-v-561ebea1="" class="dj-footer-buttons is-bottom is-fit-iphonex">
                <div data-v-561ebea1="">
                    <div data-v-561ebea1="" event-id="clickCallCenter_WH71R2YZ" onclick="contact(this)">
                        <div data-v-561ebea1="" class="cl-callcenter padding-right40">
                            <div class="cl-callcenter__img"></div>
                            <div class="cl-callcenter__text">客服</div>
                        </div>
                    </div>
                </div>
                <button data-v-561ebea1="" onclick="showPurchaseWay()"
                        class="dj-button dj-button-primary dj-button-large" event-id="click_TZPVCS6S"
                        style="flex: 1 1 0%;"><span class="button-text">立即购买</span></button>
            </div>
        </div>
        <div data-v-70f633c9="" data-v-7941d185="" selected="selected" event-id="changePriceData_P9M53VKA">
            <section data-v-f9a920c0="" data-v-70f633c9="" class="jz-clean-E-popupbox pop-wrapper"
                     event-id="confirm_60YXZS7U">
                <div data-v-f9a920c0="" class="mask" style="display: none;"></div>
                <div data-v-f9a920c0="" class="jz-clean-E-popupbox-panel" style="display: none;">
                    <div data-v-f9a920c0="" class="jz-clean-E-popupbox-container">
                        <div data-v-f9a920c0="" class="jz-clean-E-popupbox-header jz-clean-E-popupbox-header-line"
                             style="height: 1.2rem;">
                            <div data-v-f9a920c0="" class="jz-clean-E-popupbox-header-title">
                                请选择购买方式
                            </div>
                            <div data-v-f9a920c0="" onclick="hiddenPurchaseWay()"
                                 class="jz-clean-E-popupbox-header-close"><img data-v-f9a920c0=""
                                                                               style="height: .52rem;width: .52rem;"
                                                                               src=""
                                                                               alt=""></div>
                        </div>

                        <div data-v-f9a920c0="" class="jz-clean-E-popupbox-content">
                            <div data-v-70f633c9="" class="content-box">
                                <div data-v-70f633c9="" class="content-pop">
                                    <div data-v-70f633c9="" class="title">服务时间</div>
                                    <div data-v-70f633c9="" class="spec-area">
                                        <div data-v-70f633c9="" event-id="click_X3ZHCX3F"
                                             class="spec-area-item" value="2">
                                            <div data-v-70f633c9="" class="spec-area-item-hour" >2小时</div>
                                        </div>
                                        <div data-v-70f633c9="" event-id="click_X3ZHCX3F"
                                             class="spec-area-item selected"  value="3">
                                            <div data-v-70f633c9="" class="spec-area-item-hour">3小时</div>
                                        </div>
                                        <div data-v-70f633c9="" event-id="click_X3ZHCX3F"
                                             class="spec-area-item"  value="4">
                                            <div data-v-70f633c9="" class="spec-area-item-hour" >4小时</div>
                                        </div>
                                        <div data-v-70f633c9="" event-id="click_X3ZHCX3F"
                                             class="spec-area-item" value="5">
                                            <div data-v-70f633c9="" class="spec-area-item-hour">5小时</div>
                                        </div>
                                        <div data-v-70f633c9="" event-id="click_X3ZHCX3F"
                                             class="spec-area-item" value="6">
                                            <div data-v-70f633c9="" class="spec-area-item-hour">6小时</div>
                                        </div>
                                    </div>
                                    <div data-v-70f633c9="" class="spec-area-detail">3小时适合房屋面积 51-90 平米使用</div>
                                    <div data-v-70f633c9="" class="title times">购买规格</div>
                                    <div data-v-70f633c9="" class="service-time-box">
                                        <div data-v-70f633c9="">
                                            <div data-v-70f633c9="" event-id="click_PVBM02XH"
                                                 class="service-time-item equal-combo" value="1">
                                                <div data-v-70f633c9="">
                                                    <div data-v-70f633c9="" class="service-time-info">
                                                        <div data-v-70f633c9="" class="left">
                                                            <div data-v-70f633c9="" class="title">单次日常保洁3小时</div>
                                                            <div data-v-70f633c9="" class="tip"
                                                                 style="display: none;"></div>
                                                        </div>
                                                        <div data-v-70f633c9="" class="price"></div>
                                                    </div>
                                                    <div data-v-70f633c9="" class="description-price"><span
                                                            data-v-70f633c9="" class="description">系统指派保洁师</span>
                                                    </div>
                                                </div>
                                                <div data-v-70f633c9="" class="price">
                                                    <div data-v-70f633c9="" class="one-sale-price"><span
                                                            data-v-70f633c9="" class="unit">¥</span><span
                                                            data-v-70f633c9="" class="number">150</span></div>
                                                </div>
                                            </div>
                                        </div>
                                        <div data-v-70f633c9="">
                                            <div data-v-70f633c9="" event-id="click_PVBM02XH" class="service-time-item selected" value="3">
                                                <div data-v-70f633c9="">
                                                    <div data-v-70f633c9="" class="service-time-info">
                                                        <div data-v-70f633c9="" class="left">
                                                            <div data-v-70f633c9="" class="title">日常保洁3小时x3次</div>
                                                            <div data-v-70f633c9="" class="tip">新客专享</div>
                                                        </div>
                                                        <div data-v-70f633c9="" class="price">
                                                            <div data-v-70f633c9="" class="one-sale-price">
                                                                <div data-v-70f633c9="" class="original-price"><span
                                                                        data-v-70f633c9="">¥</span><span
                                                                        data-v-70f633c9="">450</span></div>
                                                                <span data-v-70f633c9="" class="unit">¥</span><span
                                                                    data-v-70f633c9="" class="number">405</span></div>
                                                        </div>
                                                    </div>
                                                    <div data-v-70f633c9="" class="description-price"><span
                                                            data-v-70f633c9="" class="description">可指定阿姨</span><span
                                                            data-v-70f633c9="" class="original-price-box"><span
                                                            data-v-70f633c9="" class="original-price-once"><span
                                                            data-v-70f633c9="" class="text">已减 </span>¥45</span></span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div data-v-70f633c9="">
                                            <div data-v-70f633c9="" event-id="click_PVBM02XH"
                                                 class="service-time-item equal-combo">
                                                <div data-v-70f633c9="">
                                                    <div data-v-70f633c9="" class="service-time-info" value="12">
                                                        <div data-v-70f633c9="" class="left">
                                                            <div data-v-70f633c9="" class="title">日常保洁3小时x12次</div>
                                                            <div data-v-70f633c9="" class="tip"
                                                                 style="display: none;"></div>
                                                        </div>
                                                    </div>
                                                    <div data-v-70f633c9="" class="description-price"><span
                                                            data-v-70f633c9="" class="description">可指定阿姨 可约周期</span>
                                                    </div>
                                                </div>
                                                <div data-v-70f633c9="" class="price">
                                                    <div data-v-70f633c9="" class="one-sale-price"><span
                                                            data-v-70f633c9="" class="unit">¥</span><span
                                                            data-v-70f633c9="" class="number">1800</span></div>
                                                </div>
                                            </div>
                                        </div>
                                        <div data-v-70f633c9="">
                                            <div data-v-70f633c9="" event-id="click_PVBM02XH"
                                                 class="service-time-item equal-combo">
                                                <div data-v-70f633c9="">
                                                    <div data-v-70f633c9="" class="service-time-info" value="26">
                                                        <div data-v-70f633c9="" class="left">
                                                            <div data-v-70f633c9="" class="title">日常保洁3小时x26次</div>
                                                            <div data-v-70f633c9="" class="tip"
                                                                 style="display: none;"></div>
                                                        </div>
                                                    </div>
                                                    <div data-v-70f633c9="" class="description-price"><span
                                                            data-v-70f633c9="" class="description">可指定阿姨 可约周期</span>
                                                    </div>
                                                </div>
                                                <div data-v-70f633c9="" class="price">
                                                    <div data-v-70f633c9="" class="one-sale-price"><span
                                                            data-v-70f633c9="" class="unit">¥</span><span
                                                            data-v-70f633c9="" class="number">3900</span></div>
                                                </div>
                                            </div>
                                        </div>
                                        <div data-v-70f633c9="">
                                            <div data-v-70f633c9="" event-id="click_PVBM02XH"
                                                 class="service-time-item equal-combo">
                                                <div data-v-70f633c9="">
                                                    <div data-v-70f633c9="" class="service-time-info" value="52">
                                                        <div data-v-70f633c9="" class="left">
                                                            <div data-v-70f633c9="" class="title">日常保洁3小时x52次</div>
                                                            <div data-v-70f633c9="" class="tip"
                                                                 style="display: none;"></div>
                                                        </div>
                                                    </div>
                                                    <div data-v-70f633c9="" class="description-price"><span
                                                            data-v-70f633c9="" class="description">可指定阿姨 可约周期</span>
                                                    </div>
                                                </div>
                                                <div data-v-70f633c9="" class="price">
                                                    <div data-v-70f633c9="" class="one-sale-price"><span
                                                            data-v-70f633c9="" class="unit">¥</span><span
                                                            data-v-70f633c9="" class="number">7800</span></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>

                        <div data-v-f9a920c0="" class="jz-clean-E-popupbox-confirm">
                            <div data-v-f9a920c0="" class="dj-footer-buttons">
                                <button onclick="toConfirmOrder()" data-v-f9a920c0=""
                                        class="dj-button dj-button-primary dj-button-large">
                                     <span class="button-text">
                        确定
                      </span></button>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>


<script>

    var memberId = '55';
    var sender = {};
    var receiver = {};
    var goods = {};
    var service = {};
    var sessionKey = "";
    var goodsId = "11757";
    $(function () {
        jssdk();
        getMemberById(memberId);
        getGoodsInfo(goodsId);

        $(".dj-swiper-item").css("width", clientWidth + "px");

        $(".spec-area-item").bind("click", function () {
            $(this).parent().find(".selected").removeClass("selected");
            $(this).addClass("selected");
        });

        $(".service-time-item").bind("click", function () {
            $(this).parent().parent().find(".selected").removeClass("selected");
            $(this).addClass("selected");
        });

        $(".dj-video-videoBtn-group").bind("click", function () {
            $(this).hide();
            $(".dj-video-poster").hide();
            var vidoeSwiper1 = document.getElementById("vidoeSwiper1");
            vidoeSwiper1.play();
        });

    });

    function pauseVideo(obj) {
        $(".dj-video-videoBtn-group").show();
        obj.pause();
    }


    function showPurchaseWay() {
        if (memberId == "0") { //0表示未登录
            // wx.miniProgram.navigateTo({url: '/pages/detail/detail?goodsId=11776'})
            // wx.miniProgram.switchTab({url: '/pages/userInfo/userInfo?type=normalClean'})
            var route = "${pageContext.request.contextPath}/page/cleanMain?preffix=easygo";
            route = encodeURIComponent(route);
            wx.miniProgram.reLaunch({url: '/pages/userInfo/userInfo?route=' + route})
        } else {
            $(".mask").css('display', 'inline');
            $(".jz-clean-E-popupbox-panel").css('display', 'inline');
        }

    }

    //跳转到小程序聊天页面
    function contact() {
        var url = '/pages/message/messageDetail/messageDetail?receiver=' + JSON.stringify(receiver) +
            '&sender=' + JSON.stringify(sender) +
            '&modeType=goodsService' +
            '&goods=' + JSON.stringify(goods) +
            '&service=' + JSON.stringify(service) +
            '&sessionKey=' + sessionKey;
        wx.miniProgram.navigateTo({url: url})

    }

    function hiddenPurchaseWay() {
        $(".mask").css('display', 'none');
        $(".jz-clean-E-popupbox-panel").css('display', 'none');
    }

    function toConfirmOrder() {
        var duration=$(".spec-area").find(".selected").attr("value");
        var cleanTimes=$(".service-time-box").find(".selected").attr("value");
        window.location.href = "${pageContext.request.contextPath}/page/confirmOrder?preffix=easygo&memberId="+
            memberId+"&duration="+duration+"&cleanTimes="+cleanTimes;
    }

    function getMemberById(memberId) {
        var param = {
            memberId: memberId,
            "method": "getMemberById"
        };
        var url = "${pageContext.request.contextPath}/api/apiSecurityController";
        $.ajax({
            url: url,
            type: "POST",
            async: true,
            contentType: "application/json; charset=utf-8",
            data: JSON.stringify(param),
            dataType: 'json',
            success: function (data) {
                if (data.resultCode == "000000") {
                    sender = data.data;
                } else {
                    alert(data.resultMsg)
                }
            }
        });

    }

    function getSessionKey() {
        var param = {
            sender: memberId,
            receiver: receiver.id,
            "method": "getSessionKey"
        };
        var url = "${pageContext.request.contextPath}/api/apiSecurityController";
        $.ajax({
            url: url,
            type: "POST",
            async: true,
            contentType: "application/json; charset=utf-8",
            data: JSON.stringify(param),
            dataType: 'json',
            success: function (data) {
                if (data.resultCode == "000000") {
                    sessionKey = data.data;
                } else {
                    alert(data.resultMsg)
                }
            }
        });

    }

    function getGoodsInfo(goodsId) {
        var param = {
            goodsId: goodsId,
            "method": "getGoodsInfo"
        };
        var url = "${pageContext.request.contextPath}/api/apiSecurityController";
        $.ajax({
            url: url,
            type: "POST",
            async: true,
            contentType: "application/json; charset=utf-8",
            data: JSON.stringify(param),
            dataType: 'json',
            success: function (data) {
                if (data.resultCode == "000000") {
                    goods = data.data.goods;
                    receiver = data.data.member;
                    // getSessionKey();
                } else {
                    alert(data.resultMsg)
                }
            }
        });
    }

</script>
</body>
</html>